package com.xingda.packing.minitor.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xingda.packing.common.BaseEntity;
import com.xingda.packing.enums.EQType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author anxiaoning
 * @since 2021-07-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class PkWheel extends BaseEntity {

    private String barCode;

    private Integer wheelType;

    private Integer qualifiedState;

    private Integer isFinished;

    private BigDecimal torqueValue;

    private Integer solder;

    private String machineNo;

    private String surfaceLr;

    private String wheelPk;

    private Integer isValid;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date scanTime;

    private String consumerName;

    private String eqType;

    private String pkInvbasdoc;

    private String wheelTag;

    private String wheelTagMap;

    private String barCodeBack;

    /**
     * 卸轮时间
     */
    private Date downTime;
    /**
     * 定长
     */
    private Integer fixedLength;

    /**
     * 颜色
     */
    private String color;
    private int area;

    public boolean isAnew() {
        return EQType.ANEW.getType().equalsIgnoreCase(getEqType());
    }
}
